<!--列表视图-->

<!--查询条件-->
<div class="input-group">
    <input type="text" class="form-control" id="realName" placeholder="请输入姓名" ng-model="realName">
    <span class="input-group-btn" ng-click="search()">
        <button class="btn btn-default" type="button">
        查询
        </button>
    </span>
</div>
<!--列表-->
<table class="table table-striped">
<thead>
    <tr>
    <th>姓名</th>
    <th>登录名</th>
    <th>性别</th>
    <th>年龄</th>
    <th>出生日期</th>
    <th>状态</th>
    <th>创建时间</th>
    <th>操作</th>
    </tr>
</thead>
<tbody>
    <tr ng-repeat="list in userLists">
    <td scope="row">{{list.realName}}</td>
    <td>{{list.loginName}}</td>
    <td>{{list.sex}}</td>
    <td>{{list.age}}</td>
    <td>{{list.birthday}}</td>
    <td>{{list.status}}</td>
    <td>{{list.createTime | date: 'yyyy-MM-dd HH:mm' }}</td>
    <td>
        <a class="btn btn-sm btn-primary" href="javascript:void(0)" role="button" ng-click="edit($index)">编辑</a>
        <a class="btn btn-sm btn-primary" href="javascript:void(0)" role="button" ng-click="remove(list._id)">删除</a>
    </td>
    </tr>
</tbody>
</table>
<!--分页-->
<nav aria-label="Page navigation">
<ul class="pagination">
    <li class="page-item" ng-class="{disabled: noPrevious()}"  ng-click="search(currentPage - 1)">
        <a class="page-link" href="javascript:void(0)" aria-label="Previous">
            <span aria-hidden="true">&laquo;</span>
            <span class="sr-only">Previous</span>
        </a>
    </li>
    <li class="page-item" ng-class="{active: isActive(p)}"  
    ng-repeat="p in pages" ng-click="search(p)">
        <a class="page-link" href="javascript:void(0)" >{{p}}</a>
    </li>
    <li class="page-item" ng-class="{disabled: noNext()}" 
    ng-click="search(currentPage + 1)">
        <a class="page-link" href="javascript:void(0)" aria-label="Next">
            <span aria-hidden="true">&raquo;</span>
            <span class="sr-only">Next</span>
        </a>
    </li>
</ul>
</nav>